import React, { Component } from "react";
import { Breadcrumb, Descriptions, Card } from "antd";

export default class Mine extends Component {
    state = {
        user: JSON.parse(window.sessionStorage.getItem("user")) || {},
    };

    render() {
        return (
            <div className="mine">
                <Breadcrumb>
                    <Breadcrumb.Item>首页</Breadcrumb.Item>
                    <Breadcrumb.Item>个人信息</Breadcrumb.Item>
                </Breadcrumb>

                <Card style={{ marginTop: "15px" }}>
                    <Descriptions title="个人信息">
                        <Descriptions.Item label="用户昵称">
                            {this.state.user.nickname}
                        </Descriptions.Item>

                        <Descriptions.Item label="所属角色">
                            {this.state.user.rname}
                        </Descriptions.Item>
                    </Descriptions>
                </Card>
            </div>
        );
    }
}
